-- GENERATED SPELL FOR [Scarlet High Clerist] --


function spell0_1839(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(15586,pUnit)
pUnit:RegisterEvent('Sorts_1839', 3500, 1)
end

function spell1_1839(pUnit, Event) --@Holy Fire,n/a--
pUnit:FullCastSpellOnTarget(17141,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1839', 13000, 1)
end

function spell2_1839(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(17139,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1839', 30321, 1)
end

function Sorts_1839(pUnit, Event)
local choix_sorts_1839 = math.random(0, 2)
if choix_sorts_1839 == 0 then
pUnit:RegisterEvent('spell0_1839', 1, 1)
end
if choix_sorts_1839 == 1 then
pUnit:RegisterEvent('spell1_1839', 1, 1)
end
if choix_sorts_1839 == 2 then
pUnit:RegisterEvent('spell2_1839', 1, 1)
end
end

function mob1839_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1839', math.random(1500, 3000), 1)
end

function mob1839_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1839_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1839_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1839, 1, 'mob1839_Action')
RegisterUnitEvent(1839, 2, 'mob1839_Leave')
RegisterUnitEvent(1839, 3, 'mob1839_Kill')
RegisterUnitEvent(1839, 4, 'mob1839_Die')
